import { observable, action } from "mobx-miniprogram";
import location from "@src/store/location";
import qqMapSdk from "@src/common/qqmap/map";
import cache from "@src/common/wxCache";

export default observable({
  goodsInfo: {},
  resourcesDetail:{},
  // ---- actions start----
  setSubmitGoodsInfo: action(function (info) {
    return new Promise((resolve, reject) => {
      if (info) {
        this.goodsInfo = info;
        resolve(info);
      } else {
        reject(false);
      }
    });
  }),
  setResourcesDetail: action(function (info) {
    return new Promise((resolve, reject) => {
      if (info) {
        this.resourcesDetail = info;
        resolve(info);
      } else {
        reject(false);
      }
    });
  }),
  // ---- actions end----
});
